3.5 \(\int (A+C \cos ^2(c+d x)) \sec (c+d x) \, dx\)

Optimal. Leaf size=24 \[ \frac {A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {C \sin (c+d x)}{d} \]

[Out]

A*arctanh(sin(d*x+c))/d+C*sin(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3014, 3770} \[ \frac {A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {C \sin (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(A + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

(A*ArcTanh[Sin[c + d*x]])/d + (C*Sin[c + d*x])/d

Rule 3014

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[
e + f*x]*(b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[(A*(m + 2) + C*(m + 1))/(m + 2), Int[(b*Sin[e + f*
x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] &&  !LtQ[m, -1]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \left (A+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx &=\frac {C \sin (c+d x)}{d}+A \int \sec (c+d x) \, dx\\ &=\frac {A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {C \sin (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 35, normalized size = 1.46 \[ \frac {A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {C \sin (c) \cos (d x)}{d}+\frac {C \cos (c) \sin (d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + C*Cos[c + d*x]^2)*Sec[c + d*x],x]

[Out]

(A*ArcTanh[Sin[c + d*x]])/d + (C*Cos[d*x]*Sin[c])/d + (C*Cos[c]*Sin[d*x])/d

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 40, normalized size = 1.67 \[ \frac {A \log \left (\sin \left (d x + c\right ) + 1\right ) - A \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, C \sin \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="fricas")

[Out]

1/2*(A*log(sin(d*x + c) + 1) - A*log(-sin(d*x + c) + 1) + 2*C*sin(d*x + c))/d

________________________________________________________________________________________

giac [A]  time = 0.22, size = 40, normalized size = 1.67 \[ \frac {A \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right ) - A \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right ) + 2 \, C \sin \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="giac")

[Out]

1/2*(A*log(abs(sin(d*x + c) + 1)) - A*log(abs(sin(d*x + c) - 1)) + 2*C*sin(d*x + c))/d

________________________________________________________________________________________

maple [A]  time = 0.10, size = 32, normalized size = 1.33 \[ \frac {A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {C \sin \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+C*cos(d*x+c)^2)*sec(d*x+c),x)

[Out]

1/d*A*ln(sec(d*x+c)+tan(d*x+c))+C*sin(d*x+c)/d

________________________________________________________________________________________

maxima [A]  time = 0.30, size = 38, normalized size = 1.58 \[ \frac {A \log \left (\sin \left (d x + c\right ) + 1\right ) - A \log \left (\sin \left (d x + c\right ) - 1\right ) + 2 \, C \sin \left (d x + c\right )}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)^2)*sec(d*x+c),x, algorithm="maxima")

[Out]

1/2*(A*log(sin(d*x + c) + 1) - A*log(sin(d*x + c) - 1) + 2*C*sin(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 22, normalized size = 0.92 \[ \frac {C\,\sin \left (c+d\,x\right )+A\,\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + C*cos(c + d*x)^2)/cos(c + d*x),x)

[Out]

(C*sin(c + d*x) + A*atanh(sin(c + d*x)))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (A + C \cos ^{2}{\left (c + d x \right )}\right ) \sec {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+C*cos(d*x+c)**2)*sec(d*x+c),x)

[Out]

Integral((A + C*cos(c + d*x)**2)*sec(c + d*x), x)

________________________________________________________________________________________